package src.com.zaizai123;

import java.awt.*;

public class LayoutPracticeByMyself {
    public static void main(String[] args) {
        Frame frame = new Frame("布局练习");
        frame.setLayout(new BorderLayout());
        frame.setSize(1500,800);
        frame.setVisible(true);
        //用panel将布局飞为上下两部分
        Panel panelNorth = new Panel();
        Panel panelSouth = new Panel();
        frame.add(panelNorth);
        frame.add(panelSouth);
        panelNorth.setBounds(1000,1000,1500,4000);
        panelNorth.setBackground(new Color(236, 163, 163));
        frame.add(panelSouth,BorderLayout.SOUTH);
        frame.add(panelNorth,BorderLayout.NORTH);

        Button buttonNLeft = new Button("buttonNLeft");
        Button buttonNRight = new Button("buttonNRight");
        Button buttonNUP = new Button("buttonNUP");
        Button buttonNDown = new Button("buttonNDown");
        panelNorth.add(buttonNLeft,BorderLayout.WEST);
        panelNorth.add(buttonNRight,BorderLayout.EAST);
        panelNorth.add(buttonNUP,BorderLayout.NORTH);
        panelNorth.add(buttonNDown,BorderLayout.SOUTH);





    }
}
